
#ifndef _PROCESS_MANAGER_H
#define _PROCESS_MANAGER_H


#include "command.h"
#include "process.h"

#include <vector>


class ProcessManager {

	public:
		static const ProcessManager& instance();
		static void setSignals(bool handle);
		void exec(Command cmd);
		virtual ~ProcessManager();

	private:
		std::vector<const Process*> m_prcs;

		ProcessManager();
		const Process* spawn(bool isBg, int gid);
		static void onSigchld(int);

};

#endif
